﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace System.Models.Models
{
    /// <summary>
    /// 住户居住表
    /// </summary>
    [Table("T_Househole_To_Storey")]
    public class HouseholeToStorey:BaseEntity
    {
        /// <summary>
        /// 住户表外键
        /// </summary>
        [ForeignKey(nameof(household))]
        public int HousehoId { get; set; }
        public Household household { get; set; }

        /// <summary>
        /// 楼盘表外键
        /// </summary>
        [ForeignKey(nameof(StoreyID))]
        public int StoreyId { get; set; }
        public Storey StoreyID { get; set; }
        /// <summary>
        /// 是否是房主
        /// </summary>
        [Required]
        public bool IsOwner { get; set; } = false;
    }
}
